package a.f.d.a;

import a.c.bb;
import a.c.k;
import a.c.m;
import a.c.w;
import a.c.x;
import a.c.z;
import a.f.c.h;
import a.f.o;
import a.f.r;
import a.f.rc;
import a.f.wc;
import a.i.db;
import a.i.p;

import java.util.*;

public class b
  extends r
{
  private static final Object g = a.f.d.e.A;
  private HashMap h;
  private k i;
  private HashMap j;
  private z k;
  private n l;
  private k m;
  private k n;
  private byte o = 0;
  private boolean p = false;
  private HashMap q;
  private HashMap r;
  public static boolean s;
  
  public boolean canLayout(o paramo)
  {
    boolean bool = d.R;
    rc localrc = a();
    if ((bool) || (localrc != null)) {
      if (bool) {
        break label32;
      }
    }
    label32:
    return localrc.canLayout(paramo);
  }
  
  public void doLayout(o paramo)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    kc localkc = kc.d(paramo);
    if (!bool2)
    {
      if (localkc == null)
      {
        a().doLayout(paramo);
        if (!bool2) {
          if (!bool1) {
            return;
          }
        }
      }
      else
      {
        this.m = paramo.c(kc.a);
        this.n = paramo.c(kc.b);
      }
    }
    else {
      if (bool2) {
        break label171;
      }
    }
    if (!paramo.n())
    {
      if (!bool2) {
        if (localkc.a()) {
          localkc.g(paramo);
        }
      }
      if (!bool2)
      {
        if (localkc.b()) {
          localkc.f(paramo);
        }
        if (bool2) {
          break label165;
        }
      }
      if (c(paramo))
      {
        localObject1 = localkc.a(0, 0);
        localObject2 = paramo.c(i.c);
        localObject3 = new p()
        {
          private final k val$node2IsGroupNodeMap;
          private final jc val$cell;
          
          public Object get(Object paramAnonymousObject)
          {
            boolean bool = d.R;
            if (!bool)
            {
              if (b.this.n != null)
              {
                if (bool) {
                  break label60;
                }
                if (b.this.n.get(paramAnonymousObject) != null) {
                  return b.this.n.get(paramAnonymousObject);
                }
              }
              if (bool) {
                break label81;
              }
            }
            if (this.val$node2IsGroupNodeMap != null) {
              label60:
              if ((!bool) && (this.val$node2IsGroupNodeMap.getBool(paramAnonymousObject))) {}
            } else {
              label81:
              return this.val$cell;
            }
            return null;
          }
        };
        paramo.a(kc.b, (k)localObject3);
      }
    }
    label165:
    localkc = a(paramo, localkc);
    label171:
    Object localObject1 = paramo.c(i.b);
    Object localObject2 = f(paramo);
    Object localObject3 = new a.i.y(paramo);
    ((a.i.y)localObject3).a((bb)localObject2);
    if (!bool2)
    {
      if (paramo.k() > 0)
      {
        a(localkc, paramo);
        a().doLayout(paramo);
        e(paramo);
        if (bool2) {
          break label255;
        }
      }
    }
    else {
      if (!bool1) {
        break label250;
      }
    }
    a(localkc);
    label250:
    ((a.i.y)localObject3).g();
    label255:
    k localk = paramo.c(kc.b);
    w localw = ((bb)localObject2).l();
    Object localObject4;
    label495:
    label497:
    do
    {
      do
      {
        if (!localw.e()) {
          break;
        }
        localObject4 = localw.d();
        jc localjc = (jc)localk.get(localObject4);
        double d1 = 1.7976931348623157E+308D;
        double d2 = 1.7976931348623157E+308D;
        double d3 = -1.797693134862316E+308D;
        double d4 = -1.797693134862316E+308D;
        if (bool2) {
          break label519;
        }
        if (bool1) {
          break label512;
        }
        Iterator localIterator = localjc.a().iterator();
        if (localIterator.hasNext()) {}
        do
        {
          jc.b_ localb_ = (jc.b_)localIterator.next();
          n localn = localb_.c;
          d1 = Math.min(d1, localn.h());
          d3 = Math.max(d3, localn.h() + localn.e());
          pc localpc = localb_.a;
          d2 = Math.min(d2, localpc.h());
          d4 = Math.max(d4, localpc.h() + localpc.e());
          if (bool2) {
            break label497;
          }
          if (bool1) {
            break label495;
          }
          if (!bool1) {
            break;
          }
          paramo.b((a.c.e)localObject4, d3 - d1, d4 - d2);
          paramo.c((a.c.e)localObject4, d1, d2);
        } while (bool2);
        localw.f();
      } while (!bool1);
    } while (bool2);
    localw = ((bb)localObject2).l();
    label512:
    label519:
    label589:
    label591:
    do
    {
      do
      {
        if (!localw.e()) {
          break label594;
        }
        localObject4 = localw.d().l();
        do
        {
          if (!((m)localObject4).e()) {
            break;
          }
          wc.b(paramo, ((m)localObject4).a());
          ((m)localObject4).f();
          if (bool2) {
            break label591;
          }
          if (bool1) {
            break label589;
          }
        } while (!bool1);
      } while (bool2);
      localw.f();
    } while (!bool1);
    label594:
    d(paramo);
    if (!bool2)
    {
      if (localObject1 != null) {
        paramo.a(i.b, (k)localObject1);
      }
      paramo.a(kc.b, this.n);
    }
    paramo.a(kc.a, this.m);
  }
  
  private boolean c(o paramo)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    k localk = paramo.c(kc.b);
    if (localk == null) {
      return true;
    }
    w localw = paramo.v();
    do
    {
      do
      {
        if (!localw.e()) {
          break;
        }
        a.c.e locale = localw.d();
        jc localjc = (jc)localk.get(locale);
        if (!bool2)
        {
          if (localjc != null)
          {
            if (bool2) {
              continue;
            }
            if (!localjc.b()) {
              return false;
            }
          }
          localw.f();
        }
      } while (!bool1);
    } while (bool2);
    return true;
  }
  
  private void d(o paramo)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    kc localkc = (kc)this.m.get(paramo);
    a.c.y localy;
    Object localObject1;
    Object localObject2;
    if (!bool2)
    {
      if (this.o == 0)
      {
        localy = localkc.f().h();
        do
        {
          do
          {
            if (!localy.e()) {
              break;
            }
            localObject1 = (n)localy.j();
            localObject2 = (n)this.r.get(localObject1);
            if (bool1) {
              break label166;
            }
            if (this.p)
            {
              ((n)localObject1).g(((n)localObject2).h() + ((n)localObject2).e());
              if (bool2) {
                continue;
              }
              if (!bool1) {}
            }
            else
            {
              ((n)localObject1).g(((n)localObject2).h());
            }
            ((n)localObject1).d(((n)localObject2).e());
            localy.f();
          } while (!bool1);
        } while (bool2);
        localy = localkc.e().h();
        label166:
        do
        {
          if (!localy.e()) {
            break;
          }
          localObject1 = (pc)localy.j();
          localObject2 = (pc)this.q.get(localObject1);
          ((pc)localObject1).g(((pc)localObject2).h());
          ((pc)localObject1).d(((pc)localObject2).e());
          localy.f();
        } while (!bool1);
      }
      if (bool2) {}
    }
    else
    {
      if (!bool2) {
        label421:
        if (this.o == 1)
        {
          localy = localkc.f().h();
          do
          {
            do
            {
              if (!localy.e()) {
                break;
              }
              localObject1 = (n)localy.j();
              localObject2 = (pc)this.r.get(localObject1);
              ((n)localObject1).g(((pc)localObject2).h());
              ((n)localObject1).d(((pc)localObject2).e());
              localy.f();
              if (bool2) {
                break label345;
              }
              if (bool1) {
                break label339;
              }
            } while (!bool1);
          } while (bool2);
          localy = localkc.e().h();
          label339:
          label345:
          do
          {
            if (!localy.e()) {
              break;
            }
            localObject1 = (pc)localy.j();
            localObject2 = (n)this.q.get(localObject1);
            if (!bool2)
            {
              if (this.p) {
                ((pc)localObject1).g(((n)localObject2).h());
              }
            }
            else
            {
              if (bool2) {
                continue;
              }
              if (!bool1) {
                break label421;
              }
            }
            ((pc)localObject1).g(((n)localObject2).h() + ((n)localObject2).e());
            ((pc)localObject1).d(((n)localObject2).e());
            localy.f();
          } while (!bool1);
        }
      }
      if (!bool2) {
        if (this.o == 3)
        {
          localy = localkc.f().h();
          do
          {
            do
            {
              if (!localy.e()) {
                break;
              }
              localObject1 = (n)localy.j();
              localObject2 = (pc)this.r.get(localObject1);
              ((n)localObject1).g(((pc)localObject2).h() + ((pc)localObject2).e());
              ((n)localObject1).d(((pc)localObject2).e());
              localy.f();
              if (bool2) {
                break label563;
              }
              if (bool1) {
                break label557;
              }
            } while (!bool1);
          } while (bool2);
          localy = localkc.e().h();
          label557:
          label563:
          label639:
          do
          {
            if (!localy.e()) {
              break;
            }
            localObject1 = (pc)localy.j();
            localObject2 = (n)this.q.get(localObject1);
            if (!bool2)
            {
              if (this.p) {
                ((pc)localObject1).g(((n)localObject2).h() + ((n)localObject2).e());
              }
            }
            else
            {
              if (bool2) {
                continue;
              }
              if (!bool1) {
                break label639;
              }
            }
            ((pc)localObject1).g(((n)localObject2).h());
            ((pc)localObject1).d(((n)localObject2).e());
            localy.f();
          } while (!bool1);
        }
      }
      if (this.o == 2)
      {
        localy = localkc.f().h();
        do
        {
          do
          {
            if (!localy.e()) {
              break;
            }
            localObject1 = (n)localy.j();
            localObject2 = (n)this.r.get(localObject1);
            if (bool1) {
              break label798;
            }
            if (this.p)
            {
              ((n)localObject1).g(((n)localObject2).h());
              if (bool2) {
                continue;
              }
              if (!bool1) {}
            }
            else
            {
              ((n)localObject1).g(((n)localObject2).h() + ((n)localObject2).e());
            }
            ((n)localObject1).d(((n)localObject2).e());
            localy.f();
          } while (!bool1);
        } while (bool2);
        localy = localkc.e().h();
        label798:
        do
        {
          if (!localy.e()) {
            break;
          }
          localObject1 = (pc)localy.j();
          localObject2 = (pc)this.q.get(localObject1);
          ((pc)localObject1).g(((pc)localObject2).h() + ((pc)localObject2).e());
          ((pc)localObject1).d(((pc)localObject2).e());
          localy.f();
        } while (!bool1);
      }
    }
  }
  
  private void e(o paramo)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    kc localkc = kc.d(paramo);
    if (!bool2)
    {
      if (localkc == null) {
        return;
      }
      if (!bool2) {
        paramo.j(g);
      }
    }
    else
    {
      if (this.i == null) {
        break label55;
      }
    }
    paramo.a(g, this.i);
    label55:
    z localz1 = localkc.f();
    if ((bool2) || (localz1 != null))
    {
      Iterator localIterator = localz1.iterator();
      Object localObject;
      label268:
      label270:
      do
      {
        do
        {
          n localn1;
          do
          {
            if (!localIterator.hasNext()) {
              break;
            }
            localn1 = (n)localIterator.next();
            localObject = (vc)this.h.get(localn1);
          } while (localObject == null);
          double d2 = ((vc)localObject).h();
          double d3 = 0.0D;
          z localz2 = (z)this.j.get(localObject);
          if ((bool2) || (bool1)) {
            break label282;
          }
          if (localz2 != null)
          {
            a.c.y localy = localz2.h();
            do
            {
              if (!localy.e()) {
                break;
              }
              n localn3 = (n)localy.j();
              localn3.g(d2);
              localn3.d(localn3.b());
              d3 += localn3.e();
              d2 += localn3.e();
              localy.f();
              if (bool2) {
                break label270;
              }
              if (bool1) {
                break label268;
              }
            } while (!bool1);
          }
          localn1.g(d2);
          if (bool2) {
            break label289;
          }
          localn1.d(((vc)localObject).i() - d3);
        } while (bool2);
      } while (!bool1);
      if (this.k != null)
      {
        label282:
        label289:
        double d1 = this.l.h() + this.l.e();
        this.k.j();
        localObject = this.k.h();
        if (((a.c.y)localObject).e()) {}
        while (bool2)
        {
          n localn2 = (n)((a.c.y)localObject).j();
          d1 -= localn2.b();
          localn2.g(d1);
          localn2.d(localn2.b());
          ((a.c.y)localObject).f();
          if ((!bool2) && (bool1)) {
            return;
          }
          if (!bool1) {
            break;
          }
        }
        this.l.d(d1 - this.l.h());
      }
    }
  }
  
  private void a(kc paramkc)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    double d1 = 0.0D;
    int i1 = 0;
    do
    {
      if (i1 >= paramkc.f().size()) {
        break;
      }
      n localn = paramkc.d(i1);
      localn.g(d1);
      localn.d(localn.b());
      if (!bool2)
      {
        if (bool1) {
          break label78;
        }
        d1 += localn.e();
        i1++;
      }
    } while (!bool1);
    label78:
    double d2 = 0.0D;
    int i2 = 0;
    do
    {
      if (i2 >= paramkc.e().size()) {
        break;
      }
      pc localpc = paramkc.c(i2);
      localpc.g(d2);
      localpc.d(localpc.b());
      d2 += localpc.e();
      i2++;
    } while (!bool1);
  }
  
  private bb f(o paramo)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    bb localbb = new bb();
    if ((bool2) || (h.b(paramo)))
    {
      k localk1 = paramo.c(i.a);
      h localh = new h(paramo);
      k localk2 = paramo.c(kc.b);
      if (localk2 != null)
      {
        x localx = db.a();
        w localw = paramo.v();
        label203:
        do
        {
          if (!localw.e()) {
            break;
          }
          a.c.e locale1 = localw.d();
          a.c.e locale2;
          do
          {
            jc localjc1 = (jc)localk2.get(locale1);
            if (bool1) {
              return localbb;
            }
            if ((bool2) || (localjc1 != null))
            {
              if (bool2) {
                break label275;
              }
              if (localjc1.b()) {
                break label269;
              }
            }
            locale2 = localh.b(locale1);
            jc localjc2 = (jc)localk2.get(locale2);
            do
            {
              if (localjc2 == null) {
                break label203;
              }
              if (bool1) {
                break;
              }
              if (!localjc2.b()) {
                break label203;
              }
              locale2 = localh.b(locale2);
              localjc2 = (jc)localk2.get(locale2);
            } while (!bool1);
          } while (bool2);
          if ((bool2) || (localk1 != null)) {
            if (bool2) {}
          }
          a.c.e locale3 = localk1.get(locale2) != null ? localk1.get(locale2) : locale2;
          localx.a(locale1, locale3);
          if (!bool2)
          {
            if (bool1) {
              localbb.add(locale1);
            }
            localw.f();
          }
        } while (!bool1);
        label269:
        label275:
        if (!bool2) {
          paramo.a(i.b, localx);
        }
      }
    }
    return localbb;
  }
  
  private void a(kc paramkc, o paramo)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    this.h = new HashMap();
    this.j = new HashMap();
    a_ locala_ = new a_();
    this.k = null;
    HashSet localHashSet = new HashSet();
    localHashSet.add(null);
    k localk = paramo.c(kc.b);
    Object localObject1 = paramo.v();
    Object localObject2;
    Object localObject3;
    do
    {
      if (!((w)localObject1).e()) {
        break;
      }
      localObject2 = ((w)localObject1).d();
      localObject3 = (jc)localk.get(localObject2);
      if (!bool2)
      {
        if (localObject3 != null)
        {
          if (bool2) {
            continue;
          }
          if (!((jc)localObject3).b()) {
            localHashSet.add(((jc)localObject3).d());
          }
        }
        ((w)localObject1).f();
      }
    } while (!bool1);
    localObject1 = paramkc.f();
    if ((bool2) || (localObject1 != null)) {
      if (!bool2)
      {
        if (!((z)localObject1).isEmpty()) {
          l.a((List)localObject1, null);
        }
      }
      else
      {
        localObject2 = ((z)localObject1).iterator();
        Object localObject4;
        label308:
        do
        {
          double d;
          do
          {
            if (!((Iterator)localObject2).hasNext()) {
              break label438;
            }
            localObject3 = new z();
            d = 0.0D;
            if (bool1) {
              return;
            }
            localObject4 = (n)((Iterator)localObject2).next();
            do
            {
              do
              {
                if (localHashSet.contains(localObject4)) {
                  break;
                }
                d += ((n)localObject4).b();
                ((z)localObject3).add(localObject4);
                if (bool1) {
                  break label308;
                }
                if (!((Iterator)localObject2).hasNext()) {
                  break;
                }
                localObject4 = (n)((Iterator)localObject2).next();
              } while (!bool1);
            } while (bool2);
            if (!localHashSet.contains(localObject4)) {
              break;
            }
            localvc = locala_.a((n)localObject4);
            localvc.c(localvc.f() + d);
            localvc.b(localvc.e() + d);
            this.j.put(localvc, localObject3);
            this.h.put(localObject4, localvc);
            this.l = ((n)localObject4);
            if (bool2) {
              break label435;
            }
          } while (!bool1);
          this.k = ((z)localObject3);
          vc localvc = (vc)this.h.get(this.l);
          localvc.d(localvc.g() + d);
          localvc.b(localvc.e() + d);
        } while (!bool1);
        label435:
        label438:
        localObject2 = db.a();
        if (!bool2)
        {
          localObject3 = paramo.v();
          do
          {
            if (!((w)localObject3).e()) {
              break;
            }
            a.c.e locale = ((w)localObject3).d();
            jc localjc = (jc)localk.get(locale);
            if (bool1) {
              break label571;
            }
            if ((bool2) || (localjc != null))
            {
              if (bool2) {
                continue;
              }
              if (!localjc.b())
              {
                localObject4 = (vc)this.h.get(localjc.d());
                ((x)localObject2).a(locale, localObject4);
              }
            }
            ((w)localObject3).f();
          } while (!bool1);
          if (!bool2) {
            this.i = paramo.c(g);
          }
          label571:
          paramo.a(g, (k)localObject2);
        }
      }
    }
  }
  
  private kc a(o paramo, kc paramkc)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    this.o = paramkc.a(paramo);
    this.p = paramkc.c(paramo);
    this.q = new HashMap();
    this.r = new HashMap();
    k localk = paramo.c(kc.b);
    kc localkc = null;
    x localx = db.a();
    Object localObject1;
    Object localObject2;
    Object localObject3;
    label307:
    Object localObject4;
    Object localObject5;
    Object localObject6;
    Object localObject7;
    Object localObject8;
    Object localObject9;
    if (!bool2) {
      if (this.o == 0)
      {
        int i1 = paramkc.f().size() - 1;
        localkc = new kc(paramkc.e().size(), paramkc.f().size());
        localObject1 = paramkc.f().h();
        do
        {
          do
          {
            if (!((a.c.y)localObject1).e()) {
              break;
            }
            localObject2 = (n)((a.c.y)localObject1).j();
            if (bool1) {
              break label307;
            }
            if (this.p)
            {
              localObject3 = localkc.d(i1 - ((n)localObject2).a());
              ((n)localObject3).c(((n)localObject2).c());
              ((n)localObject3).b(((n)localObject2).d());
              if (bool2) {
                continue;
              }
              if (!bool1) {}
            }
            else
            {
              localObject3 = localkc.d(((n)localObject2).a());
              ((n)localObject3).c(((n)localObject2).d());
              ((n)localObject3).b(((n)localObject2).c());
            }
            ((n)localObject3).a(((n)localObject2).j());
            ((n)localObject3).a(((n)localObject2).b());
            ((n)localObject3).h(((n)localObject2).i());
            this.r.put(localObject2, localObject3);
            ((a.c.y)localObject1).f();
          } while (!bool1);
        } while (bool2);
        localObject1 = paramkc.e().h();
        if (((a.c.y)localObject1).e()) {}
        while (bool2)
        {
          localObject2 = (pc)((a.c.y)localObject1).j();
          if (bool2) {
            break label2711;
          }
          localObject3 = localkc.c(((pc)localObject2).a());
          ((pc)localObject3).a(((pc)localObject2).j());
          ((pc)localObject3).a(((pc)localObject2).b());
          ((pc)localObject3).b(((pc)localObject2).c());
          ((pc)localObject3).c(((pc)localObject2).d());
          ((pc)localObject3).h(((pc)localObject2).i());
          this.q.put(localObject2, localObject3);
          ((a.c.y)localObject1).f();
          if (bool1) {
            break label2709;
          }
          if (!bool1) {
            break;
          }
        }
        localObject1 = paramo.v();
        label660:
        label704:
        label711:
        while (((w)localObject1).e())
        {
          localObject2 = ((w)localObject1).d();
          localObject3 = (jc)localk.get(localObject2);
          if (bool2) {
            break label2692;
          }
          if (bool1) {
            break label2709;
          }
          if ((bool2) || (localObject3 != null))
          {
            if (!bool2) {
              if (((jc)localObject3).b())
              {
                localObject4 = new z();
                localObject5 = new z();
                localObject6 = ((jc)localObject3).a().iterator();
                do
                {
                  if (!((Iterator)localObject6).hasNext()) {
                    break;
                  }
                  localObject7 = (jc.b_)((Iterator)localObject6).next();
                  localObject8 = (pc)this.q.get(((jc.b_)localObject7).a);
                  ((z)localObject5).add(localObject8);
                  localObject9 = (n)this.r.get(((jc.b_)localObject7).c);
                  ((z)localObject4).add(localObject9);
                  if ((!bool2) && (bool1)) {
                    break label711;
                  }
                } while (!bool1);
                localObject6 = localkc.a((Collection)localObject5, (Collection)localObject4);
                if (bool2) {
                  break label660;
                }
                localx.a(localObject2, localObject6);
                if (bool2) {
                  continue;
                }
                if (!bool1) {
                  break label704;
                }
              }
            }
            localObject4 = (pc)this.q.get(((jc)localObject3).c());
            localObject5 = (n)this.r.get(((jc)localObject3).d());
            localObject6 = localkc.a((pc)localObject4, (n)localObject5);
            localx.a(localObject2, localObject6);
          }
          ((w)localObject1).f();
        }
      }
    }
    int i2;
    if (!bool2) {
      if (this.o == 1)
      {
        localkc = new kc(paramkc.f().size(), paramkc.e().size());
        a.c.y localy1 = paramkc.f().h();
        do
        {
          if (!localy1.e()) {
            break;
          }
          localObject1 = (n)localy1.j();
          if (bool2) {
            break label2711;
          }
          localObject2 = localkc.c(((n)localObject1).a());
          ((pc)localObject2).a(((n)localObject1).j());
          ((pc)localObject2).a(((n)localObject1).b());
          ((pc)localObject2).b(((n)localObject1).c());
          ((pc)localObject2).c(((n)localObject1).d());
          ((pc)localObject2).h(((n)localObject1).i());
          this.r.put(localObject1, localObject2);
          localy1.f();
          if (bool1) {
            break label2709;
          }
        } while (!bool1);
        i2 = paramkc.e().size() - 1;
        if (bool2) {
          break label2711;
        }
        localObject1 = paramkc.e().h();
        do
        {
          do
          {
            if (!((a.c.y)localObject1).e()) {
              break;
            }
            localObject2 = (pc)((a.c.y)localObject1).j();
            localObject3 = null;
            if ((!bool2) && (bool1)) {
              break label2709;
            }
            if (this.p)
            {
              localObject3 = localkc.d(((pc)localObject2).a());
              ((n)localObject3).c(((pc)localObject2).d());
              ((n)localObject3).b(((pc)localObject2).c());
            }
            else
            {
              localObject3 = localkc.d(i2 - ((pc)localObject2).a());
              ((n)localObject3).c(((pc)localObject2).c());
              ((n)localObject3).b(((pc)localObject2).d());
            }
            ((n)localObject3).a(((pc)localObject2).j());
            ((n)localObject3).a(((pc)localObject2).b());
            ((n)localObject3).h(((pc)localObject2).i());
            this.q.put(localObject2, localObject3);
            ((a.c.y)localObject1).f();
          } while (!bool1);
        } while (bool2);
        localObject1 = paramo.v();
        label1310:
        label1354:
        label1361:
        while (((w)localObject1).e())
        {
          localObject2 = ((w)localObject1).d();
          localObject3 = (jc)localk.get(localObject2);
          if (bool2) {
            break label2692;
          }
          if (bool1) {
            break label2709;
          }
          if ((bool2) || (localObject3 != null))
          {
            if (!bool2) {
              if (((jc)localObject3).b())
              {
                localObject4 = new z();
                localObject5 = new z();
                localObject6 = ((jc)localObject3).a().iterator();
                do
                {
                  if (!((Iterator)localObject6).hasNext()) {
                    break;
                  }
                  localObject7 = (jc.b_)((Iterator)localObject6).next();
                  localObject8 = (pc)this.r.get(((jc.b_)localObject7).c);
                  ((z)localObject5).add(localObject8);
                  localObject9 = (n)this.q.get(((jc.b_)localObject7).a);
                  ((z)localObject4).add(localObject9);
                  if ((!bool2) && (bool1)) {
                    break label1361;
                  }
                } while (!bool1);
                localObject6 = localkc.a((Collection)localObject5, (Collection)localObject4);
                if (bool2) {
                  break label1310;
                }
                localx.a(localObject2, localObject6);
                if (bool2) {
                  continue;
                }
                if (!bool1) {
                  break label1354;
                }
              }
            }
            localObject4 = (pc)this.r.get(((jc)localObject3).d());
            localObject5 = (n)this.q.get(((jc)localObject3).c());
            localObject6 = localkc.a((pc)localObject4, (n)localObject5);
            localx.a(localObject2, localObject6);
          }
          ((w)localObject1).f();
        }
      }
    }
    n localn;
    if (!bool2) {
      if (this.o == 3)
      {
        localkc = new kc(paramkc.f().size(), paramkc.e().size());
        i2 = paramkc.f().size() - 1;
        localObject1 = paramkc.f().h();
        do
        {
          if (!((a.c.y)localObject1).e()) {
            break;
          }
          localObject2 = (n)((a.c.y)localObject1).j();
          if (bool2) {
            break label2711;
          }
          localObject3 = localkc.c(i2 - ((n)localObject2).a());
          ((pc)localObject3).a(((n)localObject2).j());
          ((pc)localObject3).a(((n)localObject2).b());
          ((pc)localObject3).b(((n)localObject2).d());
          ((pc)localObject3).c(((n)localObject2).c());
          ((pc)localObject3).h(((n)localObject2).i());
          this.r.put(localObject2, localObject3);
          ((a.c.y)localObject1).f();
          if (bool1) {
            break label2709;
          }
        } while (!bool1);
        int i3 = paramkc.e().size() - 1;
        if (bool2) {
          break label2711;
        }
        localObject2 = paramkc.e().h();
        do
        {
          do
          {
            if (!((a.c.y)localObject2).e()) {
              break;
            }
            localObject3 = (pc)((a.c.y)localObject2).j();
            if ((!bool2) && (bool1)) {
              break label2709;
            }
            if (this.p)
            {
              localObject4 = localkc.d(i3 - ((pc)localObject3).a());
              ((n)localObject4).c(((pc)localObject3).c());
              ((n)localObject4).b(((pc)localObject3).d());
              if (bool2) {
                continue;
              }
              if (!bool1) {}
            }
            else
            {
              localObject4 = localkc.d(((pc)localObject3).a());
              ((n)localObject4).c(((pc)localObject3).d());
              ((n)localObject4).b(((pc)localObject3).c());
            }
            ((n)localObject4).a(((pc)localObject3).j());
            ((n)localObject4).a(((pc)localObject3).b());
            ((n)localObject4).h(((pc)localObject3).i());
            this.q.put(localObject3, localObject4);
            ((a.c.y)localObject2).f();
          } while (!bool1);
        } while (bool2);
        localObject2 = paramo.v();
        label1978:
        label2022:
        label2029:
        while (((w)localObject2).e())
        {
          localObject3 = ((w)localObject2).d();
          localObject4 = (jc)localk.get(localObject3);
          if (bool2) {
            break label2692;
          }
          if (bool1) {
            break label2709;
          }
          if ((bool2) || (localObject4 != null))
          {
            if (!bool2) {
              if (((jc)localObject4).b())
              {
                localObject5 = new z();
                localObject6 = new z();
                localObject7 = ((jc)localObject4).a().iterator();
                do
                {
                  if (!((Iterator)localObject7).hasNext()) {
                    break;
                  }
                  localObject8 = (jc.b_)((Iterator)localObject7).next();
                  localObject9 = (pc)this.r.get(((jc.b_)localObject8).c);
                  ((z)localObject6).add(localObject9);
                  localn = (n)this.q.get(((jc.b_)localObject8).a);
                  ((z)localObject5).add(localn);
                  if ((!bool2) && (bool1)) {
                    break label2029;
                  }
                } while (!bool1);
                localObject7 = localkc.a((Collection)localObject6, (Collection)localObject5);
                if (bool2) {
                  break label1978;
                }
                localx.a(localObject3, localObject7);
                if (bool2) {
                  continue;
                }
                if (!bool1) {
                  break label2022;
                }
              }
            }
            localObject5 = (pc)this.r.get(((jc)localObject4).d());
            localObject6 = (n)this.q.get(((jc)localObject4).c());
            localObject7 = localkc.a((pc)localObject5, (n)localObject6);
            localx.a(localObject3, localObject7);
          }
          ((w)localObject2).f();
        }
      }
    }
    if (this.o == 2)
    {
      localkc = new kc(paramkc.e().size(), paramkc.f().size());
      i2 = paramkc.f().size() - 1;
      a.c.y localy2 = paramkc.f().h();
      do
      {
        do
        {
          if (!localy2.e()) {
            break;
          }
          localObject2 = (n)localy2.j();
          localObject3 = null;
          if (bool1) {
            break label2258;
          }
          if (this.p)
          {
            localObject3 = localkc.d(((n)localObject2).a());
            ((n)localObject3).c(((n)localObject2).d());
            ((n)localObject3).b(((n)localObject2).c());
          }
          else
          {
            localObject3 = localkc.d(i2 - ((n)localObject2).a());
            ((n)localObject3).c(((n)localObject2).c());
            ((n)localObject3).b(((n)localObject2).d());
          }
          ((n)localObject3).a(((n)localObject2).j());
          ((n)localObject3).a(((n)localObject2).b());
          ((n)localObject3).h(((n)localObject2).i());
          this.r.put(localObject2, localObject3);
          localy2.f();
        } while (!bool1);
      } while (bool2);
      label2258:
      int i4 = paramkc.e().size() - 1;
      localObject2 = paramkc.e().h();
      do
      {
        do
        {
          if (!((a.c.y)localObject2).e()) {
            break;
          }
          localObject3 = (pc)((a.c.y)localObject2).j();
          if (bool2) {
            break label2711;
          }
          localObject4 = localkc.c(i4 - ((pc)localObject3).a());
          ((pc)localObject4).a(((pc)localObject3).j());
          ((pc)localObject4).a(((pc)localObject3).b());
          ((pc)localObject4).b(((pc)localObject3).d());
          ((pc)localObject4).c(((pc)localObject3).c());
          ((pc)localObject4).h(((pc)localObject3).i());
          this.q.put(localObject3, localObject4);
          ((a.c.y)localObject2).f();
          if (bool1) {
            break label2709;
          }
        } while (!bool1);
      } while (bool2);
      localObject2 = paramo.v();
      label2627:
      label2671:
      label2678:
      label2680:
      do
      {
        if (!((w)localObject2).e()) {
          break;
        }
        localObject3 = ((w)localObject2).d();
        localObject4 = (jc)localk.get(localObject3);
        if (bool1) {
          break label2709;
        }
        if ((bool2) || (localObject4 != null))
        {
          if (!bool2) {
            if (((jc)localObject4).b())
            {
              localObject5 = new z();
              localObject6 = new z();
              localObject7 = ((jc)localObject4).a().iterator();
              do
              {
                if (!((Iterator)localObject7).hasNext()) {
                  break;
                }
                localObject8 = (jc.b_)((Iterator)localObject7).next();
                localObject9 = (pc)this.q.get(((jc.b_)localObject8).a);
                ((z)localObject6).add(localObject9);
                localn = (n)this.r.get(((jc.b_)localObject8).c);
                ((z)localObject5).add(localn);
                if (bool2) {
                  break label2680;
                }
                if (bool1) {
                  break label2678;
                }
              } while (!bool1);
              localObject7 = localkc.a((Collection)localObject6, (Collection)localObject5);
              if (bool2) {
                break label2627;
              }
              localx.a(localObject3, localObject7);
              if (bool2) {
                continue;
              }
              if (!bool1) {
                break label2671;
              }
            }
          }
          localObject5 = (pc)this.q.get(((jc)localObject4).c());
          localObject6 = (n)this.r.get(((jc)localObject4).d());
          localObject7 = localkc.a((pc)localObject5, (n)localObject6);
          localx.a(localObject3, localObject7);
        }
        ((w)localObject2).f();
      } while (!bool1);
    }
    paramo.a(kc.b, localx);
    label2692:
    if (!bool2) {
      paramo.a(kc.a, q.a(localkc));
    }
    label2709:
    label2711:
    return localkc;
  }
  
  private static final class a_
  {
    private final ArrayList a = new ArrayList();
    private final Collection c = Collections.unmodifiableCollection(this.a);
    
    vc a(n paramn)
    {
      vc localvc = new vc(new Integer(this.a.size()));
      this.a.add(localvc);
      localvc.a(true);
      localvc.b(paramn.b());
      localvc.c(paramn.c());
      localvc.d(paramn.d());
      localvc.a(paramn.i());
      return localvc;
    }
    
    Collection a()
    {
      return this.c;
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.d.a.b

 * JD-Core Version:    0.7.0.1

 */